package dto

import "time"

type Message struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement;comment:'主键'" json:"id"`
	Title       string    `gorm:"column:title;type:varchar(255);not null;comment:'标题'" json:"title"`
	Content     string    `gorm:"column:content;type:text;not null;comment:'内容'" json:"content"`
	SendType    string    `gorm:"column:send_type;type:varchar(50);not null;comment:'发送类型（system / friend / notice）'" json:"sendType"`
	SendTime    time.Time `gorm:"column:send_time;not null;comment:'发送时间'" json:"sendTime"`
	CreatedTime time.Time `gorm:"column:created_time;not null;comment:'创建时间'" json:"createdTime"`
}

func (Message) TableName() string {
	return "l_message"
}
